﻿Jxstar.currentPage = function() {
	var config = {param:{},initpage:function(page, define){},eventcfg:{}};
	
	var auditData = Jxstar.findComboData('audit');
	var items = [{
		height: '97%',
		width: '97%',
		border: false,
		layout: 'form',
		style: 'padding:10px;',
		items: [{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'trigger', fieldLabel:'项目编号', name:'quality_quest__project_code',
						anchor:'100%', readOnly:true, triggerClass:'x-form-search-trigger',
						maxLength:20, editable:true,
						onTriggerClick: function() {
							var selcfg = {pageType:'combogrid', nodeId:'project_select', layoutPage:'', sourceField:'', targetField:'', whereSql:"", whereValue:'', whereType:'', isSame:'1', isShowData:'1', isMoreSelect:'0',isReadonly:'1',fieldName:'quality_quest.project_code'};
							JxSelect.createSelectWin(selcfg, this, 'node_quality_quest_form');
						}},
					{xtype:'textfield', fieldLabel:'项目名称', name:'quality_quest__project_name', readOnly:true, anchor:'100%', maxLength:100},
					{xtype:'textfield', fieldLabel:'项目负责人', name:'quality_quest__project_user', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'datefield', fieldLabel:'编制日期', name:'quality_quest__quest_date', defaultval:'fun_getToday()', format:'Y-m-d', anchor:'100%', readOnly:true},
					{xtype:'datefield', fieldLabel:'要求回复时间', name:'quality_quest__reply_date', format:'Y-m-d', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目负责人ID', name:'quality_quest__project_userid', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'项目ID', name:'quality_quest__project_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'主键', name:'quality_quest__quest_id', anchor:'100%'},
					{xtype:'textfield', fieldLabel:'检查编号', name:'quality_quest__plan_no', readOnly:true, anchor:'100%', maxLength:20}
				]
			},{
				border:false,
				columnWidth:0.495,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'combo', fieldLabel:'记录状态', name:'quality_quest__auditing', defaultval:'0',
						anchor:'100%', readOnly:true, editable:false,
						store: new Ext.data.SimpleStore({
							fields:['value','text'],
							data: auditData
						}),
						emptyText: jx.star.select,
						mode: 'local',
						triggerAction: 'all',
						valueField: 'value',
						displayField: 'text',
						value: auditData[0][0]},
					{xtype:'textfield', fieldLabel:'整改编号', name:'quality_quest__quest_code', readOnly:true, anchor:'100%', maxLength:20},
					{xtype:'textfield', fieldLabel:'接收单位', name:'quality_quest__dept_name', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'textfield', fieldLabel:'编制人', name:'quality_quest__quest_user', defaultval:'fun_getUserName()', readOnly:true, anchor:'100%', maxLength:50},
					{xtype:'datefield', fieldLabel:'要求完成时间', name:'quality_quest__end_date', format:'Y-m-d', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'检查类别', name:'quality_quest__check_type1', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'编制人ID', name:'quality_quest__quest_userid', defaultval:'fun_getUserId()', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'部门ID', name:'quality_quest__dept_id', anchor:'100%'},
					{xtype:'hidden', fieldLabel:'检查单ID', name:'quality_quest__check_id', anchor:'100%'}
				]
			}
			]
		},{
			anchor:'100%',
			border: false,
			layout:'column',
			autoHeight:true,
			items:[{
				border:false,
				columnWidth:0.99,
				layout:'form',
				style: 'padding-left:10px;',
				items:[
					{xtype:'textarea', fieldLabel:'不合格描述', name:'quality_quest__result_cause', allowBlank:false, labelStyle:'color:#0000FF;', labelSeparator:'*', width:'100%', height:48, maxLength:200},
					{xtype:'textarea', fieldLabel:'备注', name:'quality_quest__comments', width:'100%', height:48, maxLength:200}
				]
			}
			]
		}]
	}];
	
	config.param = {
		items: items,
		funid: 'quality_quest'
	};

	
	
	return new Jxstar.FormNode(config);
}